package factory.simplefactory;

public class FruitFactory {

    public static Fruit getFruit(String type){
        switch (type){
            case "苹果":
                return new Apple();
            case "橙子":
                return new Orange();
            default:
                return null;
        }
    }
}
